package com.wavehi.stack;

/**
 * @Author WaveHi
 * @Date 9/10/2021 下午 8:48
 * @Version 1.0
 * @Contact HJBWaveHi@163.com
 * @Description Demonstrate the working principle of stack.
 */
public class StackWorkingPrincipleDemo {

    public static void main(String[] args) {
        StackWorkingPrincipleDemo stackWorkingPrincipleDemo = new StackWorkingPrincipleDemo();
        stackWorkingPrincipleDemo.method01();
    }

    public void method01() {
        System.out.println("Method01 start!");
        method02();
        System.out.println("Method01 stop!");
    }

    public void method02() {
        System.out.println("Method02 start!");
        method03();
        System.out.println("Method02 stop!");
    }

    public void method03() {
        System.out.println("Method03 start!");
        int num1 = 1;
        System.out.println("Method03 stop!");
    }
}
